Ext.namespace("ZANY.util");
ZANY.util.Msg = function(title, msg){
    Ext.Msg.show({
        title: title, 
        msg: msg,
        minWidth: 200,
        modal: true,
        icon: Ext.Msg.INFO,
        buttons: Ext.Msg.OK
    });
};

function moneyFormat(v){
	if(isNaN(v)){
		return '';
	}
	v = (Math.round((v - 0) * 100)) / 100;
	v = (v == Math.floor(v)) ? v + ".00" : ((v * 10 == Math.floor(v * 10))
			? v + "0"
			: v);
	v = String(v);
	var ps = v.split('.');
	var whole = ps[0];
	var r = /(\d+)(\d{3})/;
	while (r.test(whole)) {
		whole = whole.replace(r, '$1' + ',' + '$2');
	}
		var sub = ps[1] ? '.' + ps[1] : '.00';
		v = whole + sub;
	return  v;
}

